import requestV2 from "@/utils/requestV2";


export function create(data){
  return requestV2({
    url: "superAdmin/adInfo/create",
    method: "post",
    data: data,
  })
}

export function remove(adId){
  return requestV2({
    url: `superAdmin/adInfo/delete?adId=${adId}`,
    method: "post",
  })
}

export function update(data){
  return requestV2({
    url: "superAdmin/adInfo/update",
    method: "post",
    data: data,
  })
}

export function updateStatus(adId,status){
  return requestV2({
    url: `superAdmin/adInfo/updateStatus?adId=${adId}&status=${status}`,
    method: 'POST'
  })
}

export function resetPassword(data){
  return requestV2({
    url: 'superAdmin/adInfo/resetPassword',
    method: 'post',
    data: data
  })
}

export function giveRole(data){
  return requestV2({
    url: 'superAdmin/adInfo/giveRole',
    method: 'post',
    data: data
  })
}

export function getRoleIds(adId){
  return requestV2({
    url: `superAdmin/adInfo/getRoleIds?adId=${adId}`,
    method: 'get',
  })
}

export function getAdminSimpleInfo(){
  return requestV2({
    url: `superAdmin/adInfo/adminSimpleInfo`,
    method: 'get'
  })
}

export function page(params){
  return requestV2({
    url: "superAdmin/adInfo/list",
    method: "GET",
    params: params
  })
}